/*!
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

body {
  position: relative;
  padding: 70px 0 100px;
  min-height: 100vh;
  overflow-y: scroll;
  background-color: #fff;
}

nav {
  box-shadow: 0 3px 3px #aaa;
  z-index: 999;
}

pre {
  overflow: auto;
  word-wrap: normal;
  white-space: pre;
}

pre code {
  overflow-wrap: normal;
  white-space: pre;
}

input,
select {
  margin: 0;
}

div.container {
  width: 98%;
  padding-left: 15px;
  padding-right: 15px;
}

.navbar a {
  color: #51504f;
  font-weight: bold;
}

.navbar a .caret {
  color: #e2d2e2;
}

.navbar-nav li.dropdown:hover > .dropdown-menu,
.navbar-nav li.dropdown:focus-within > .dropdown-menu {
  display: block;
}

/* If a menu remains open due to focus, a menu
  opened via hover will always be displayed on top */
.navbar-nav li.dropdown:hover > .dropdown-menu {
  z-index: 1001;
}

.navbar-brand {
  padding: 0 15px;
  height: 60px;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: 104px;
  height: 40px;
  overflow: visible !important;/* Allow for animation */
}

@keyframes pinSpin {
  from {
    transform: rotate(0) translateX(0);
  }

  to {
    transform: rotate(360deg) translateX(0);
  }
}

.navbar-brand:hover .brand-logo-pinwheel {
  transform-origin: 17.66px 17.66px;
  animation: pinSpin 1.5s linear infinite;
}

.navbar-user-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  vertical-align: middle;
  margin: -5px 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #017cee;
  background-color: #c0defb;
}

span.status_square {
  width: 10px;
  height: 10px;
  border: 1px solid grey;
  display: inline-block;
  padding-left: 0;
  cursor: pointer;
}

div.squares {
  float: right;
  font-size: 1;
}

span.success {
  background-color: #1b8e49;
}

span.up_for_retry {
  background-color: gold;
}

span.up_for_reschedule {
  background-color: #00c7d4;
}

span.started {
  background-color: #04d659;
}

span.error {
  background-color: #e43921;
}

span.queued {
  background-color: #cbcbcb;
}

span.upstream_failed {
  background-color: orange;
}

span.skipped {
  background-color: #f8cec8;
}

.d3-tip {
  background: #000;
  color: #fff;
  border: solid;
  border-width: 1px;
  border-radius: 5px;
  padding: 10px;
}

input#execution_date {
  margin-bottom: 0;
}

table.highlighttable {
  width: 100%;
  table-layout: fixed;
}

div.linenodiv {
  padding-right: 1px !important;
}

.linenos {
  width: 50px;
  border: 0;
}

div.linenodiv pre {
  padding-left: 0;
  padding-right: 4px;
  color: #8e8e8d;
  background-color: transparent;
  text-align: right;
}

.wrap {
  white-space: pre-wrap;
}

.code {
  font-family: monospace;
}

#sql {
  border: 1px solid #ccc;
  border-radius: 5px;
}

.ace_editor div {
  font: inherit !important;
}

#ace_container {
  margin: 10px 0;
}

#sql_ace {
  visibility: hidden;
}

table.dataframe {
  font-size: 12px;
}

table.dataframe tbody tr td {
  padding: 2px;
}

table.dataframe.dataTable thead > tr > th {
  padding: 10px 20px 10px 10px;
}

table.dataTable.dataframe thead .sorting {
  background: url('./../sort_both.png') no-repeat center right;
}

table.dataTable.dataframe thead .sorting_desc {
  background: url('./../sort_desc.png') no-repeat center right;
}

table.dataTable.dataframe thead .sorting_asc {
  background: url('./../sort_asc.png') no-repeat center right;
}

.no-wrap {
  white-space: nowrap;
}

div.form-inline {
  margin-bottom: 5px;
}

body div.panel {
  padding: 0;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  margin-right: 4px;
  border-radius: 4px;
  border: solid 2px #cbcbcb;
  padding: 0 3px;
  font-size: 11px;
}

.legend-item--no-border {
  border-color: transparent;
  padding: 0;
}

.legend-item:last-child {
  margin-right: 0;
}

.legend-item__swatch {
  display: inline-block;
  margin-right: 3px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: solid 1px #8e8e8d;
  background: #fff;
}

.legend-item__swatch--circle {
  border-radius: 50%;
  width: 14px;
  height: 14px;
}

.legend-item__swatch--no-border {
  border-color: transparent;
}

label[for="timezone-other"],
#timezone-other {
  margin: 3px 20px;
  font-weight: normal;
}

#timezone-menu ul.typeahead.dropdown-menu {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* depending on the version of FAB in use, we may have a style conflict */
.bootstrap-datetimepicker-widget .datepicker > div {
  display: block;
}

.accordion-toggle {
  display: block;
}

.accordion-toggle.collapsed > .toggle-direction {
  transform: rotate(180deg);
}

.dag-import-error {
  white-space: pre;
}

/* stylelint-disable declaration-block-single-line-max-declarations */
.hll { background-color: #ffc; }
.c { color: #408080; font-style: italic; } /* Comment */
.err { border: 1px solid #f00; } /* Error */
.k { color: #008000; font-weight: bold; } /* Keyword */
.o { color: #666; } /* Operator */
.cm { color: #408080; font-style: italic; } /* Comment.Multiline */
.cp { color: #bc7a00; } /* Comment.Preproc */
.c1 { color: #408080; font-style: italic; } /* Comment.Single */
.cs { color: #408080; font-style: italic; } /* Comment.Special */
.gd { color: #a00000; } /* Generic.Deleted */
.ge { font-style: italic; } /* Generic.Emph */
.gr { color: #f00; } /* Generic.Error */
.gh { color: #000080; font-weight: bold; } /* Generic.Heading */
.gi { color: #00a000; } /* Generic.Inserted */
.go { color: #888; } /* Generic.Output */
.gp { color: #000080; font-weight: bold; } /* Generic.Prompt */
.gs { font-weight: bold; } /* Generic.Strong */
.gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
.gt { color: #04d; } /* Generic.Traceback */
.kc { color: #008000; font-weight: bold; } /* Keyword.Constant */
.kd { color: #008000; font-weight: bold; } /* Keyword.Declaration */
.kn { color: #008000; font-weight: bold; } /* Keyword.Namespace */
.kp { color: #008000; } /* Keyword.Pseudo */
.kr { color: #008000; font-weight: bold; } /* Keyword.Reserved */
.kt { color: #b00040; } /* Keyword.Type */
.m { color: #666; } /* Literal.Number */
.s { color: #ba2121; } /* Literal.String */
.na { color: #7d9029; } /* Name.Attribute */
.nb { color: #008000; } /* Name.Builtin */
.nc { color: #00f; font-weight: bold; } /* Name.Class */
.no { color: #800; } /* Name.Constant */
.nd { color: #a2f; } /* Name.Decorator */
.ni { color: #999; font-weight: bold; } /* Name.Entity */
.ne { color: #d2413a; font-weight: bold; } /* Name.Exception */
.nf { color: #00f; } /* Name.Function */
.nl { color: #a0a000; } /* Name.Label */
.nn { color: #00f; font-weight: bold; } /* Name.Namespace */
.nt { color: #008000; font-weight: bold; } /* Name.Tag */
.nv { color: #19177c; } /* Name.Variable */
.ow { color: #a2f; font-weight: bold; } /* Operator.Word */
.w { color: #bbb; } /* Text.Whitespace */
.mb { color: #666; } /* Literal.Number.Bin */
.mf { color: #666; } /* Literal.Number.Float */
.mh { color: #666; } /* Literal.Number.Hex */
.mi { color: #666; } /* Literal.Number.Integer */
.mo { color: #666; } /* Literal.Number.Oct */
.sb { color: #ba2121; } /* Literal.String.Backtick */
.sc { color: #ba2121; } /* Literal.String.Char */
.sd { color: #ba2121; font-style: italic; } /* Literal.String.Doc */
.s2 { color: #ba2121; } /* Literal.String.Double */
.s1 { color: #ba2121; } /* Literal.String.Single */
/* stylelint-enable declaration-block-single-line-max-declarations */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
  color: #8e8e8d;
  background-color: #f5f5f5;
}

.dag-view-tools {
  margin: 16px 0;
  padding: 16px 0;
  background-color: #f0f0f0;
}

.code-wrap {
  position: relative;
  margin-top: 30px;
}

.code-wrap-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
}

.search-input {
  position: relative;
}

.search-input__input {
  padding-right: 40px;
}

.search-input__clear-btn {
  position: absolute;
  right: 2px;
  top: 2px;
  border: 0;
}

/* Override default Bootstrap behavior to prevent wrapping */
.btn-group {
  display: inline-flex;
}

/* Override FAB table views where table width extends beyond parent containers */
.panel-body .panel-group + div {
  overflow-x: auto;
}

.task-instance-modal-column {
  margin-top: 8px;
  overflow-x: auto;
}
